My first question was:
Dinio - Sat Dec 26 11:04:30 EST 2015 |
Re: AttrDef related questions? Hi Dinio, You will find that the answers to all or most of your questions are in the dxl manual that can be found either in doors or in the Internet on the IBM Documentation.
Costas
|
Re: AttrDef related questions? 1.+4. I agree that it's easy to get confused. An AttrDef is what you see when you open the dialog Edit -> Types in a module. An attribute (or AttrDef) can exist for every object, for the module itself or both. if the property ad.object evaluates to "true", then the current AttrDef is for objects, and for every object you will have this attribute.
2. either "DXL text of an attribute that uses DXL attribute. " or "Whether the attribute definition is for an attribute that has its value generated by DXL.", depending on whether you store the result to a string or bool variable.
3. A ModuleProperties is more or less what you see when you open the dialog File -> ModuleProperties. The big advantage of using ModuleProperties is that module properties can be read from a module without having to open it - this is faster when you have big modules. There are some overlaps, for example
5. Questions beginning with "Why" often cannot be answered for DOORS - usually nobody has an idea why the developers chose this or that way how to get an information. URLs can be retrieved with the perm getURL. Note that an AttrDef has no URL. Only Databases, Modules, ModName_ ModuleVersions, Objects, Folders, Projects and Items have URLs. Why would you want to get the URL of an AttrDef? Concerning your last question ("How to distinguish"), just in case I have not explained it well: you have to distinguish the concept of attribute definitions and of attributes. An AttrDef defines that an attribute exists, it contains the information which type the attribute has. The attribute itself contains the value. So, you can either iterate over the attributes or over the attribute definitions. |
Re: AttrDef related questions? Mike.Scharnow - Sun Dec 27 16:30:44 EST 2015 1.+4. I agree that it's easy to get confused. An AttrDef is what you see when you open the dialog Edit -> Types in a module. An attribute (or AttrDef) can exist for every object, for the module itself or both. if the property ad.object evaluates to "true", then the current AttrDef is for objects, and for every object you will have this attribute.
2. either "DXL text of an attribute that uses DXL attribute. " or "Whether the attribute definition is for an attribute that has its value generated by DXL.", depending on whether you store the result to a string or bool variable.
3. A ModuleProperties is more or less what you see when you open the dialog File -> ModuleProperties. The big advantage of using ModuleProperties is that module properties can be read from a module without having to open it - this is faster when you have big modules. There are some overlaps, for example
5. Questions beginning with "Why" often cannot be answered for DOORS - usually nobody has an idea why the developers chose this or that way how to get an information. URLs can be retrieved with the perm getURL. Note that an AttrDef has no URL. Only Databases, Modules, ModName_ ModuleVersions, Objects, Folders, Projects and Items have URLs. Why would you want to get the URL of an AttrDef? Concerning your last question ("How to distinguish"), just in case I have not explained it well: you have to distinguish the concept of attribute definitions and of attributes. An AttrDef defines that an attribute exists, it contains the information which type the attribute has. The attribute itself contains the value. So, you can either iterate over the attributes or over the attribute definitions. BIG thakns,@Mark.Scharnow, for the answer, but I have couple of question that comes from it. Sorry for that I am new to DXL but I want to clear the main concepts:
|
Re: AttrDef related questions? Dinio - Mon Dec 28 03:27:46 EST 2015 BIG thakns,@Mark.Scharnow, for the answer, but I have couple of question that comes from it. Sorry for that I am new to DXL but I want to clear the main concepts:
Thanks, Dinio. I understand that you are new to DXL, but permit the question: Are you aware that it is mandatory to have good experience as DOORS administrator to be able to program DXL? I would say that you need to work for half a year as administrator, including responsibility for the data model before you start even thinking about programming DXL. You need to have experience with the DOORS GUI and everything that changes when you click somewhere. Otherwise it is too easy to confuse DOORS terms and to mess up the contents of your Database. If you already have this experience, then programming DXL is more or less about finding the correct command for each GUI element (at least in programs concerning data model definition) . Concerning your questions, you are right in all questions. 1: asking DOORS for ad.module and ad.object are nothing more or less than "looking at" the area "Attribute Scope" in Module Editor -> Edit -> Attributes -> double click:
2. Yes. You can also see the difference in the GUI: The definition of the attribute is in Module Editor -> Edit -> Attributes (even including the default value if there is one), and the content of the attribute is in Module Editor -> File -> Module Properties. 3. Yes. Again, its all in the GUI. Look at the screen shot:
the code "bool bIsItADXLAttribute = ad.dxl" will tell you whether the check box will be on or off (green), So, Yes, you are right again. the code "string strDXLCode = ad.dxl" will give you the content of Browse -> Current (red), so it will give you (or set) the DXL code itself.
|
Re: AttrDef related questions? Again BIG thanks. Now when you said I will pay attention on the GUI. THanks !!!! |